package com.activitycode.datamodel.model;

import org.json.*;
import java.util.ArrayList;

public class FatherStyleBase {
	
    private ArrayList<FatherStyle> fatherStyle;
    
    
	public FatherStyleBase () {
		
	}	
        
    public FatherStyleBase (JSONObject json) {
    

        this.fatherStyle = new ArrayList<FatherStyle>();
        JSONArray arrayFatherStyle = json.optJSONArray("fatherStyle");
        if (null != arrayFatherStyle) {
            int fatherStyleLength = arrayFatherStyle.length();
            for (int i = 0; i < fatherStyleLength; i++) {
                JSONObject item = arrayFatherStyle.optJSONObject(i);
                if (null != item) {
                    this.fatherStyle.add(new FatherStyle(item));
                }
            }
        }
        else {
            JSONObject item = json.optJSONObject("fatherStyle");
            if (null != item) {
                this.fatherStyle.add(new FatherStyle(item));
            }
        }


    }
    
    public ArrayList<FatherStyle> getFatherStyle() {
        return this.fatherStyle;
    }

    public void setFatherStyle(ArrayList<FatherStyle> fatherStyle) {
        this.fatherStyle = fatherStyle;
    }


    
}
